When dom0 fails to balloon enough memory to allow a new domain to start,
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 1 Apr 2006 09:52:47 +0000 (10:52 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 1 Apr 2006 09:52:47 +0000 (10:52 +0100)
an exception is thrown.  The test that decides which exception to throw
is backwards, resulting in strange error messages.  The attached patch
fixes the problem.

Signed-off-by: Charles Coffing <ccoffing@novell.com>
tools/python/xen/xend/balloon.py

index 56c0e75e5672e821a84d8904fb0b874f3c9607cd..63f1f7eb4212df5ac5c13421fbb3922afc01cea4 100644 (file)
@@ -152,7 +152,7 @@ def free(required):
                            'I cannot release any more.  I need %d MiB but '
                            'only have %d.') %
                           (need_mem, free_mem))
-        elif new_alloc >= dom0_min_mem:
+        elif new_alloc < dom0_min_mem:
             raise VmError(
                 ('I need %d MiB, but dom0_min_mem is %d and shrinking to '
                  '%d MiB would leave only %d MiB free.') %